﻿using RXY_Mall.Application.Shop.Dto;
using RXY_Mall.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Shop
{
    public interface IShopService
    {
        #region 商家

        //IList<CompanyList> GetCompanysByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax, string companyName, string realName, int status, out int totalCount);
        Response<IPagedList<CompanyList>> GetCompanysByPage(string dateMin, string dateMax, string companyName, string realName, int status, int page_index = 1, int page_size = 20, int shop_id = -1);
        /// <summary>
        /// 禁用/启用
        /// </summary>
        /// <param name="manageId"></param>
        /// <param name="id"></param>
        /// <param name="isUse"></param>
        /// <returns></returns>
        bool SetIsComUse(int manageId, int id, int isUse);

        CompanyInput GetCompanyById(int id);

        CompanyInput GetCompanyByShopId(int id);

        bool IsExistCompany(string name);

        Task<Response<bool>> AddorEditCompany(int managerId, CompanyInput input);
        #endregion

        #region 店铺

        IList<ShopList> GetShopsByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax, string shopName, string managerName, int status, out int totalCount);

        /// <summary>
        /// 禁用/启用
        /// </summary>
        /// <param name="manageId"></param>
        /// <param name="id"></param>
        /// <param name="isUse"></param>
        /// <returns></returns>
        bool SetIsShopUse(int manageId, int id, int isUse);

        ShopInput GetShopById(int id);

        bool IsExistShop(string name);

        Task<Response<int>> AddorEditShop(int managerId, ShopInput input);

        List<ShopCategoryDto> GetShopCategoryList(int id);

        ShopCategoryDto GetShopCategory(int shopId,int categoryId,int type);

        Task<Response<int>> SetShopCategory(int managerId, int id, List<ShopCategoryInput> addList, List<ShopCategoryInput>  delList);

        //群发短信
        int SendGroupMsg();
        #endregion
    }
}
